/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.fgv.tcc.fgv.imovel.controlle;

import static br.com.fgv.tcc.fgv.imovel.controlle.AbstractCrudBean.logger;
import br.com.fgv.tcc.fgv.imovel.model.Categoria;
import br.com.fgv.tcc.fgv.imovel.model.Imovel;
import br.com.fgv.tcc.fgv.imovel.model.Usuario;
import br.com.fgv.tcc.fgv.imovel.service.ImovelService;
import br.com.fgv.tcc.fgv.imovel.service.Service;
import java.io.Serializable;
import javax.ejb.EJB;
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;
import org.apache.log4j.LogManager;

/**
 *
 * @author diego
 */
@Named(value = "imovelM")
@SessionScoped
public class ImovelMBean extends AbstractCrudBean<Imovel> implements Serializable {

    @EJB
    private ImovelService ejbFacade;

    public ImovelMBean() {
        logger = LogManager.getLogger(Imovel.class.getName());
        selected = new Imovel();

    }

    @Override
    public Service getServiceManager() {
        return ejbFacade;

    }

    @Override
    public void novaInstancia() {
        selected = new Imovel();
    }

    public Imovel getSelected() {
        return selected;
    }

    public void setSelected(Imovel selected) {
        this.selected = selected;
    }

}
